package com.fy56.platform.goodsTracking.queue;

import org.apache.log4j.Logger;

import java.util.Map;

/**
 * 本地队列消费者
 */
public class CollectionPoll implements Runnable {
    private static final Logger logger = Logger.getLogger(CollectionPoll.class);

    public void run() {

 /*   while (!CollectionLinkedQueue.getQueue().isEmpty()) {
            Map<String, Object> map = CollectionLinkedQueue.getQueue()
                    .poll();
            Long begin = System.currentTimeMillis();
           CollectionInfoApi collectionInfoApi = (CollectionInfoApi) map.get("collectionInfoApi");
            try {
                logger.info(collectionInfoApi.sendCollectionInfo(map));// 上传代收
            } catch (Exception e) {
                logger.error("本地队列消费，上传代收异常", e);
            }
            Long end = System.currentTimeMillis();
            logger.info("上传代收用时：" + (end - begin) + "毫秒。");
        }
        CollectionLinkedQueue.getLatch().countDown();*/
    }

}
